<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<div class="my_pages" style="width: auto;">
	<c:choose>
		<c:when test="${page.currentIndex-1<1}">
			<button data-url="javascript:void(0)" type="button" class="button button-default" disabled="disabled">&nbsp;&nbsp;&laquo;&nbsp;&nbsp;</button>
		</c:when>
		<c:otherwise>
			<button data-url="${page.href}${page.currentIndex-1}" title="上一页" type="button" class="button button-default">&nbsp;&nbsp;&laquo;&nbsp;&nbsp;</button>
		</c:otherwise>
	</c:choose>
	<c:choose>
		<c:when test="${page.totalPages>1 }">
			<button data-url="${page.href}1" type="button" class="button button-default" title="1">首页</button>
		</c:when>
		<c:otherwise>
			<button data-url="javascript:void(0)" type="button" class="button button-default" disabled="disabled" title="1">首页</button>
		</c:otherwise>
	</c:choose>

	<c:if test="${page.currentIndex-5>=1}">
				......
				<button data-url="${page.href}${page.currentIndex-5}" type="button" class="button button-default" title="${page.currentIndex-5}">${page.currentIndex-5}</button>
	</c:if>
	<c:if test="${page.currentIndex-4>=1}">
		<button data-url="${page.href}${page.currentIndex-4}" type="button" class="button button-default" title="${page.currentIndex-4}">${page.currentIndex-4}</button>
	</c:if>
	<c:if test="${page.currentIndex-3>=1}">
		<button data-url="${page.href}${page.currentIndex-3}" type="button" class="button button-default" title="${page.currentIndex-3}">${page.currentIndex-3}</button>
	</c:if>
	<c:if test="${page.currentIndex-2>=1}">
		<button data-url="${page.href}${page.currentIndex-2}" type="button" class="button button-default" title="${page.currentIndex-2}">${page.currentIndex-2}</button>
	</c:if>
	<c:if test="${page.currentIndex-1>=1}">
		<button data-url="${page.href}${page.currentIndex-1}" type="button" class="button button-default" title="${page.currentIndex-1}">${page.currentIndex-1}</button>
	</c:if>
	<button data-url="javascript:void(0)" type="button" class="button button-success" disabled="disabled" title="${page.currentIndex }">${page.currentIndex}</button>
	<c:if test="${page.currentIndex+1<=page.totalPages}">
		<button data-url="${page.href}${page.currentIndex+1}" type="button" class="button button-default" title="${page.currentIndex+1}">${page.currentIndex+1}</button>
	</c:if>
	<c:if test="${page.currentIndex+2<=page.totalPages}">
		<button data-url="${page.href}${page.currentIndex+2}" type="button" class="button button-default" title="${page.currentIndex+2}">${page.currentIndex+2}</button>
	</c:if>
	<c:if test="${page.currentIndex+3<=page.totalPages}">
		<button data-url="${page.href}${page.currentIndex+3}" type="button" class="button button-default" title="${page.currentIndex+3}">${page.currentIndex+3}</button>
	</c:if>
	<c:if test="${page.currentIndex+4<=page.totalPages}">
		<button data-url="${page.href}${page.currentIndex+4}" type="button" class="button button-default" title="${page.currentIndex+4}">${page.currentIndex+4}</button>
	</c:if>
	<c:if test="${page.currentIndex+5<=page.totalPages}">
		<button data-url="${page.href}${page.currentIndex+5}" type="button" class="button button-default" title="${page.currentIndex+5}">${page.currentIndex+5}</button>
			......
			</c:if>
	<c:choose>
		<c:when test="${page.totalPages>1 }">
			<button data-url="${page.href}${page.totalPages}" type="button" class="button button-default" title="${page.totalPages }">末页</button>
		</c:when>
		<c:otherwise>
			<button data-url="javascript:void(0)" type="button" class="button button-default" disabled="disabled" title="${page.totalPages }">末页</button>
		</c:otherwise>
	</c:choose>
	<c:choose>
		<c:when test="${page.currentIndex+1>page.totalPages}">
			<button data-url="javascript:void(0)" type="button" class="button button-default" disabled="disabled">&nbsp;&nbsp;&raquo;&nbsp;&nbsp;</button>
		</c:when>
		<c:otherwise>
			<button data-url="${page.href}${page.currentIndex+1}" title="下一页" type="button" class="button button-default">&nbsp;&nbsp;&raquo;&nbsp;&nbsp;</button>
		</c:otherwise>
	</c:choose>
</div>
